#pragma once
class SelectionDialog
{
	LONGLONG mFileLength;
	LONGLONG mAddress1, mAddress2;
	WNDPROC mDefaultProcedureForEditField;
	HWND mEditField1, mEditField2;
	HWND mOkButton;
	bool mValid1, mValid2;
public:
	SelectionDialog(LONGLONG fileLength);

	bool DoModal(HINSTANCE, HWND parentWindow);
	LONGLONG GetAddress1() const;
	LONGLONG GetAddress2() const;

private:
	static LRESULT CALLBACK WindowProcForEditField(HWND hwndEdit,
		UINT uMsg, WPARAM wParam, LPARAM lParam);
	static INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT inMessage,
		WPARAM wParam, LPARAM lParam);

	void ValidateAddress(HWND editField);
	void LinkToDilogWindow(HWND);
};

